package me.w70.bot.scripting;

import java.awt.Graphics;

import me.w70.bot.Bot;

public abstract class Random extends Script implements Runnable {

	public abstract boolean canRun();

	public void draw(Graphics g) {
		
	}

	public void run() {

	}

	public void execute() {
		try {
			if (Bot.methods.getClient() != null) {
				if (canRun()) {
					try {
						int w = loop();
						if (w < 0) {
							running = false;
							return;
						}
						wait(w);
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			}
		} catch (Exception e) {

		}
	}

}
